package com.springboot.fwwb09.controller;

import com.springboot.fwwb09.entity.emplyoee;
import com.springboot.fwwb09.service.emplyoeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("ygcx")
@CrossOrigin
public class employeeController {

    @Autowired
    private emplyoeeService emplyoeeService;

    //    查询所有的方法
    @GetMapping("findAll")
    public List<emplyoee> findAll() {
        List<emplyoee> emplyoee = emplyoeeService.findAll();
        return emplyoee;

    }

}
